package ar.edu.utn.fixture;
import java.lang.ref.*;
import ar.edu.utn.injectors.*;
import ar.edu.utn.xcontainer.Container;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import ar.edu.utn.behavior.*;

public class pruebita {

	/**
	 * @param <T>
	 * @param args
	 * @throws Exception 
	 */
	public static <T> void main(String[] args) throws Exception {
		
		/*Class<?> clazz;
		clazz=Class.forName("ar.edu.utn.fixture.PersonaService");
		Constructor[] con=clazz.getDeclaredConstructors();
		Class<?>[] typeParameters=con[0].getParameterTypes();
		for(Class<?> type:typeParameters){
			System.out.println(type.toString());
		}
			
		}*/
		Container container=new Container();
		container.addComponent("personaService", "ar.edu.utn.fixture.PersonaService");
		
		/*container.addSimpleDependency("personaService", "name", ");*/
		List<Parameter> par=new ArrayList<Parameter>();
		Parameter p1=new Parameter("sarasa", 3);
		Parameter p2=new Parameter("sarasa", "hola");
		Parameter p3=new Parameter("ar.edu.utn.fixture.PersonaService",null);
		par.add(p1);
		par.add(p2);
		par.add(p3);
		Object[] parms=ConstructorApplicator.getconstructorArgValue(par, container);
		
		
		/*Object[] parms = {3, "Ricco"};
		Constructor con=PersonaService.class.getConstructor(int.class,String.class);
		
		con.newInstance(parms);
				
		/*Object s=false;
		boolean d=(boolean)s;
		Class clazz=PersonaService.class;
		System.out.println(clazz.equals(Class.forName("ar.edu.utn.fixture.PersonaService")));*/
		
	
		
		}
}
		

	


